package com.googlecode.bip.dao.utils;

import java.sql.SQLException;
import java.util.List;
import javax.naming.NamingException;

/**
 * Build a {@link List} of item T from a SQL query
 * 
 * @see ListableInstance
 */
public interface ListableGetter<T>
{
    /**
     * Build a {@link List} of item T from a SQL query
     *
     * @param sql SQL query to find T item in data base
     * @return a {@link List} of <XMP><T></XMP> (not null)
     * @throws SQLException if any
     * @throws NamingException if any
     */
    public List<T> getList( String sql ) throws SQLException, NamingException;
}
